<?php
/**
 * @ Fmash Top System
 * @ version: 3.0
 * @ author: i.coffee.smile@mail.com
 * @ date:2011-1-27
 * @ file:index.php $4
 */
 
if(!empty($_SERVER['QUERY_STRING']) && is_numeric($_SERVER['QUERY_STRING'])) {
	$p = $_SERVER['QUERY_STRING'];
	header("location:show.php?id=$p");
	echo "location:show.php?id=$p";
}

include_once 'class_mysql.php';
include_once 'function.php';
include_once 'function_math.php';

$row1 = query_show($top_girls);
$row2 = query_show($top_girls);

if($row2[0]==$row1[0])
{
	header('location:index.php');
}

if($row1[3] > $row2[3])
{
	$message = "我们猜测<B>$row1[1]</B>会更受你喜欢！";
}elseif($row1[3] < $row2[3]){
	$message = "我们猜测<B>$row2[1]</B>会更受你喜欢！";
}else{
	$message = '世事无常，系统无法预测您的喜好！';
}

$enurl1 = enid($row1[0],$row2[0]);
$enurl2 = enid($row2[0],$row1[0]);

$en_see1 = en_see($row1[0]);
$en_see2 = en_see($row2[0]);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>吉首大学帅哥榜 - 收录吉首大学最帅的帅哥</title>
<link href="style/love.css" media="screen" rel="stylesheet" type="text/css" />
</head>

<body onkeydown="KeyDown()" oncontextmenu="event.returnValue=false">
<?php include_once("header.template");?>
    <div id="wrapper">
      <div id="wrapper-inner">
        <div id="canvas">
          <div id="content">
            <div class="pageheader">
              <h2>
                欢迎光临吉首大学嘛嘻社区帅哥榜:)
              </h2>
              <div class="right">
                <ul class="tabs">
                  <li class="active">
                    <a href="./">
                      随机
                    </a>
                  </li>
                  <li>
                    <a href="new.php">
                      最新帅哥
                    </a>
                  </li>
                  <li>
                    <a href="top.php">
                      排名情况
                    </a>
                  </li>
                </ul>
              </div>
            </div>
            <div class="clear">
            </div>
            <div class="catalog">
              <div id="banner">
              <a href="./">
              	<img src="img/banner.jpg" />
               </a><br />
               <div id="x">点击图片代表给他投票，点击姓名查看详细资料，登陆后，不仅可以交流，还可以点击资料页爱心代表粉他，增加他的排名。</div>
              </div>
              <div id="center">
                            <div id="left">
                            <a href="count.php?c=<?php echo $enurl1;?>"><img src="show/<?php echo $row1[2];?>" alt="<?php echo $row1[1];?>"></a><br />
                            <a href="see.php?c=<?php echo $en_see1;?>" target="_blank"><?php echo $row1[1];?></a>
              				</div>
                     		<div id="OR">
        					『PK』
       						</div>
             				<div id="right">
              				<a href="count.php?c=<?php echo $enurl2;?>"><img src="show/<?php echo $row2[2];?>" alt="<?php echo $row2[1];?>"></a><br />
                            <a href="see.php?c=<?php echo $en_see2;?>" target="_blank"><?php echo $row2[1];?></a>
              				</div>
                            <div id="pagination">
                				<div class="pages">
                				<?php echo $message; ?>
                                </div>
              				</div>
              </div>
              <div class="clear">
              </div>
            </div>
          </div>
        </div>
        <div class="clear">
        </div>
      </div>
    </div>
<?php include_once("footer.template");?>
</body>
</html>